import {request} from "@utils/http"

interface UserLoginType {
    account: string
    password: string
}

export const userLoginAPI = (data: UserLoginType) => {
    return request.post('/user/login', data)
}

export const userLogoutAPI = () => {
    return request.post('/user/logout', {},
        {
            headers: {
                token: localStorage.getItem("token")
            }
        }
    )
}

export const getUserInfoAPI = () => {
    return request.get('/user/getUserInfo')
}
